/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dominio.torcedor.socio;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author devair
 */
@Entity
@Table(name = "carteirinha")
@SequenceGenerator(name = "carteirinhaseq", initialValue = 1, allocationSize = 1)

public class Carteirinha implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "carteirinhaseq")
    private Long id;
    private String formaEntrega;
    
    
    @ManyToOne(cascade = CascadeType.ALL)
    private Associado associado;

    /**
     * @return the formaEntrega
     */
    public String getFormaEntrega() {
        return formaEntrega;
    }

    /**
     * @param formaEntrega the formaEntrega to set
     */
    public void setFormaEntrega(String formaEntrega) {
        this.formaEntrega = formaEntrega;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the associado
     */
    public Associado getAssociado() {
        return associado;
    }

    /**
     * @param associado the associado to set
     */
    public void setAssociado(Associado associado) {
        this.associado = associado;
    }

}
